﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/MainPage.Master" CodeBehind="UserPage.aspx.vb" Inherits="PetsCare.UserPage" 
    title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style14
        {
            width: 1144px;
        }
        .style21
        {
            height: 40px;
            width: 167px;
        }
        .style23
        {
            height: 312px;
            width: 167px;
        }
        .style24
        {
            font-family: Verdana;
            color: Purple;
            font-size: medium;
            height: 40px;
            width: 578px;
        }
        .style25
        {
            width: 578px;
            height: 312px;
            font-family: Verdana;
            font-size: 15px;
            color: #006600;
        }
        .style26
        {
            width: 578px;
            height: 32px;
        }
        .style28
        {
            width: 578px;
            height: 384px;
        }
        .style29
        {
            height: 384px;
            width: 167px;
        }
        .style30
        {
            color: White;
            font-family: Verdana;
            font-size: 18px;
            width: 237px;
        }
        .style31
        {
            height: 312px;
            width: 237px;
        }
        .style32
        {
            height: 384px;
            width: 237px;
        }
        .style33
        {
            height: 32px;
            width: 237px;
        }
        .style34
        {
            height: 32px;
            width: 167px;
        }
        .style35
        {
            font-size: 15px;
            font-family: Verdana;
            font-style: italic;
        }
        </style>
    <link href="StyleSheet1.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style14">
        <tr class="NormalHeaders">
            <td class="style30">
                Welcome,
                <asp:Label ID="lbl_UserName" runat="server" Text="User Name"></asp:Label>
&nbsp;!</td>
            <td class="style24">
                <asp:Label ID="Uid_lbl" runat="server" Visible="False" CssClass="UpageHeadings"></asp:Label>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:PetsConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:PetsConnectionString.ProviderName %>" 
                    
                    
                    SelectCommand="SELECT [ID], [PetName], [photo] FROM [PetDetails] WHERE ([OwnerName] = ?)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="Uid_lbl" Name="OwnerName" PropertyName="Text" 
                            Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td class="style21" align="center" valign="middle">
                <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Italic="False" 
                    Font-Names="Verdana" Font-Size="Small" Text="Your Pets" 
                    CssClass="NormalHeaders"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style31" valign="top">
                <asp:Image ID="UserProfileIMG" runat="server" Height="171px" Width="138px" />
                <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                </asp:ToolkitScriptManager>
            </td>
            <td class="style25" valign="top">
                <br />
                <asp:ImageButton ID="Img_rssDiscussionBTN" runat="server" Height="71px" 
                    ImageUrl="~/Images/rss_logo.gif" Width="79px" />
&nbsp; Link to rss Discussion.<br />
                <br />
                <br />
            </td>
            <td class="style23" valign="top" align="left">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" DataSourceID="SqlDataSource1" 
                    Width="167px" Height="187px">
                    <Columns>
                        <asp:ImageField DataImageUrlField="photo">
                        </asp:ImageField>
                        <asp:BoundField DataField="PetName" HeaderText="PetName" 
                            SortExpression="PetName" />
                        <asp:HyperLinkField DataNavigateUrlFields="ID" 
                            DataNavigateUrlFormatString="Details.aspx?ID={0}" Text="Details" />
                    </Columns>

<PagerStyle CssClass="pgr"></PagerStyle>

<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                </asp:GridView>
                <br />
            </td>
        </tr>
        <tr>
            <td class="style32" valign="top">
                <asp:Menu ID="Menu2" runat="server" Height="158px" Width="159px" 
                    BackColor="#E3EAEB" DynamicHorizontalOffset="2" Font-Names="Verdana" 
                    Font-Size="0.8em" ForeColor="#666666" StaticSubMenuIndent="10px">
                    <StaticSelectedStyle BackColor="#1C5E55" />
                    <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                    <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
                    <DynamicMenuStyle BackColor="#E3EAEB" />
                    <DynamicSelectedStyle BackColor="#1C5E55" />
                    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
                    <StaticHoverStyle BackColor="#666666" ForeColor="White" />
                    <Items>
                        <asp:MenuItem NavigateUrl="~/AddNewPet.aspx" Text="Add new pet" 
                            Value="Add new pet"></asp:MenuItem>
                        <asp:MenuItem NavigateUrl="~/UserInformation.aspx" 
                            Text="Update Your Information" Value="Update Your Information">
                        </asp:MenuItem>
                        <asp:MenuItem NavigateUrl="~/List.aspx" Text="List of pets" Value="List "></asp:MenuItem>
                        <asp:MenuItem NavigateUrl="~/ShowingChart.aspx" Text="Tagging Graph" 
                            Value="Tagging Graph"></asp:MenuItem>
                    </Items>
                </asp:Menu>
                </td>
            <td class="style28" valign="top">
                <span class="style35">All the discussions which you have started :</span><asp:GridView 
                    ID="GridView3" runat="server" AutoGenerateColumns="False" CssClass="mGrid" 
                    DataKeyNames="ID" DataSourceID="DiscussionLOAD">
                    <Columns>
                        <asp:ImageField DataImageUrlField="UserImage" HeaderText="User Photo">
                        </asp:ImageField>
                        <asp:BoundField DataField="UserName" HeaderText="UserName" 
                            SortExpression="UserName" />
                        <asp:HyperLinkField DataNavigateUrlFields="ID" 
                            DataNavigateUrlFormatString="DiscussionDetails.aspx?ID={0}" 
                            DataTextField="Title" Text="Title" />
                        <asp:BoundField DataField="Description" HeaderText="Description" 
                            SortExpression="Description" />
                        <asp:BoundField DataField="Dateofpost" HeaderText="Date" 
                            SortExpression="Dateofpost" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="DiscussionLOAD" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:PetsConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:PetsConnectionString.ProviderName %>" 
                    SelectCommand="SELECT * FROM [Discussion_tbl] WHERE ([UserName] = ?)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="lbl_UserName" Name="UserName" 
                            PropertyName="Text" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                </td>
            <td class="style29" align="left" valign="top">
                <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                    AutoGenerateColumns="False" CssClass="mGrid" PagerStyle-CssClass="pgr" 
                    AlternatingRowStyle-CssClass="alt" DataSourceID="SqlDataSource2" 
                    Width="167px" Height="187px">
                    <Columns>
                        <asp:HyperLinkField DataNavigateUrlFields="VisitorID" 
                            DataNavigateUrlFormatString="UserProfileShow.aspx?ID={0}" 
                            DataTextField="NameOFVisitor" />
                        <asp:BoundField DataField="DateOfVisit" HeaderText="DateOfVisit" 
                            SortExpression="DateOfVisit" />
                        <asp:BoundField DataField="TimeOfVisit" HeaderText="TimeOfVisit" 
                            SortExpression="TimeOfVisit" />
                    </Columns>

<PagerStyle CssClass="pgr"></PagerStyle>

<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:PetsConnectionString %>" 
                    ProviderName="<%$ ConnectionStrings:PetsConnectionString.ProviderName %>" 
                    
                    
                    
                    SelectCommand="SELECT [NameOFVisitor], [DateOfVisit], [TimeOfVisit], [VisitorID], [UserID] FROM [RecentVisitors] WHERE ([UserID] = ?)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="Uid_lbl" Name="UserID" PropertyName="Text" 
                            Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:Label ID="lbl_showerror" runat="server" ForeColor="#CC0000"></asp:Label>
                <br />
                
                <br />
                </td>
        </tr>
        <tr>
            <td class="style33" align="left" valign="baseline">
                &nbsp;</td>
            <td class="style26">
            </td>
            <td class="style34" valign="top">
                </td>
        </tr>
    </table>
</asp:Content>
